home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_10_10
/
1010018a
< prev
next >
Wrap
Text File
|
1992-08-11
|
330b
|
18 lines
Listing 6 -- the file strcat.c
/* strcat function */
#include <string.h>
char *(strcat)(char *s1, const char *s2)
{ /* copy char s2[] to end of s1[] */
char *s;
for (s = s1; *s != '\0'; ++s)
; /* find end of s1[] */
for (; (*s = *s2) != '\0'; ++s, ++s2)
; /* copy s2[] to end */
return (s1);
}